#
# SpriteBatch generic Qt project include
# include this file and spritebatch with various backends is automatically
# linked with your project.  
#
# Define USE_GLES11, USE_GLES20, USE_OPENVG to enable backends!
#
# note that only GL/VG libraries are linked, EGL is not included!
#

SOURCES += $$PWD/src_general/SpriteBatch.cpp
HEADERS += $$PWD/src_general/SpriteBatch.h
INCLUDEPATH += $$PWD/src_general

SOURCES += $$PWD/src_qpainterspritebatch/QPainterSpriteBatch.cpp
HEADERS += $$PWD/src_qpainterspritebatch/QPainterSpriteBatch.h
INCLUDEPATH += $$PWD/src_qpainterspritebatch


contains(DEFINES, USE_GLES11) {
    INCLUDEPATH += $$PWD/src_gles11spritebatch/
    SOURCES += $$PWD/src_gles11spritebatch/GLES11SpriteBatch.cpp
    HEADERS += $$PWD/src_gles11spritebatch/GLES11SpriteBatch.h
    contains(MEEGO_EDITION,harmattan) {
        LIBS += -lGLES_CM
    }
    else {
        LIBS += -llibGLESv1_CM
    }
}

contains(DEFINES, USE_GLES20) {
    INCLUDEPATH += $$PWD/src_gles2spritebatch/
    SOURCES += $$PWD/src_gles2spritebatch/GLES2SpriteBatch.cpp
    HEADERS += $$PWD/src_gles2spritebatch/GLES2SpriteBatch.h
    contains(MEEGO_EDITION,harmattan) {
        LIBS += -lGLESv2
    }
    else {
        LIBS += -llibGLESv2
    }
}

contains(DEFINES, USE_OPENVG) {
    INCLUDEPATH += $$PWD/src_openvgspritebatch/
    SOURCES += $$PWD/src_openvgspritebatch/OVGSpriteBatch.cpp
    HEADERS +=$$PWD/src_openvgspritebatch/OVGSpriteBatch.h
    LIBS += -llibOpenVG
}

contains(DEFINES, USE_QTGL) {
    INCLUDEPATH += $$PWD/src_qtopenglspritebatch/
    SOURCES += $$PWD/src_qtopenglspritebatch/QtOpenGLSpriteBatch.cpp
    HEADERS +=$$PWD/src_qtopenglspritebatch/QtOpenGLSpriteBatch.h
    QT += opengl
}

